<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width,initial-scale=1.0" />
    <link rel="stylesheet" media="print" href="/print/_css/report.css" />
    <title>健康报告打印</title>
</head>

<body>
    <div class="printOrder newReport" id="reportApp">
        <div class="print-logo_img">
            <img class="img-logo" :src="logo" />
        </div>
        <h3 class="print-report_title">
            {{hosiptal}}
        </h3>
        <h3 class="print-report_title">儿童体检报告</h3>
        <div class="print-pay_box" style="margin-top:10mm;">
            <div class="child_report_header" style="border-left: 1px solid #aaa;border-right: 1px solid #aaa;">
                <div class="child_myself" style="border-top:1px solid #aaa;">
                    <div class="child-my_item" style="width:40%;">
                        <span>姓名</span>
                        {{detail.name}}
                    </div>
                    <div class="child-my_item">
                        <span>年龄</span>
                        {{detail.age}}岁{{detail.sdfMonth}}月{{detail.sdfDay}}天
                    </div>
                    <div class="child-my_item">
                        <span>性别</span>
                        {{detail.sex ==1?'男':(detail.sex ==2?'女':'不详')}}
                    </div>
                </div>
                <div class="child_myself">
                    <div class="child-my_item" style="width:40%;">
                        <span>联系电话</span>
                        {{detail.mobile}}
                    </div>
                    <div class="child-my_item" style="border-right:0px;">
                        <span>联系地址</span>
                        {{detail.address}}
                    </div>
                </div>
            </div>
            <div class="child_report_content" style="border-left: 1px solid #aaa;border-right: 1px solid #aaa;">
                <div class="project-item last_Project" style="height:40mm;">
                    <div class="pro_title">
                        <span>基础检查</span>
                    </div>
                    <div class="pro_item-content">
                        <div class="pro_item_box">
                            <div v-for="(item,index) in signForm" class="pro_item">
                                <span>{{item.attrName}}</span>
                                <label></label>
                            </div>
                            <div class="pro_item">
                                <span></span>
                                <label></label>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="project-item" style="height:90mm;">
                    <div class="pro_title">
                        <span>体格检查</span>
                    </div>
                    <div class="pro_item-content">
                        <div class="pro_item_box">
                            <div v-for="(item,index) in infos" :key="index" class="pro_item"
                                :style="{'border-right':(index+1)%2==0?'0px':''}">
                                <span>{{item.attrName}}</span>
                                <!-- <label v-if="item.attrType=='SELECT'"> {{item.values2}}{{item.attrUnit}}</label> -->
                                <label> </label>
                            </div>
                            <!-- <div class="pro_item" style="border-left: 0px;" >
                                <span></span>
                                <label></label>
                            </div> -->
                            <!-- <div class="pro_item">
                                <span>头颅</span>
                            </div>
                            <div class="pro_item">
                                <span>心（听诊）</span>
                            </div>
                            <div class="pro_item">
                                <span>眼睛</span>
                            </div>
                            <div class="pro_item">
                                <span>肺（听诊）</span>
                            </div>
                            <div class="pro_item">
                                <span>耳</span>
                            </div>
                            <div class="pro_item">
                                <span>肝（肋下）</span>
                            </div>
                            <div class="pro_item">
                                <span>鼻</span>
                            </div>
                            <div class="pro_item">
                                <span>脾（肋下）</span>
                            </div>
                            <div class="pro_item">
                                <span>口腔</span>
                            </div>
                            <div class="pro_item">
                                <span>骨骼</span>
                            </div>
                            <div class="pro_item">
                                <span>腮腺</span>
                            </div>
                            <div class="pro_item">
                                <span>胸廓</span>
                            </div>
                            <div class="pro_item">
                                <span>颈部</span>
                            </div>
                            <div class="pro_item">
                                <span>腹部</span>
                            </div>
                            <div class="pro_item">
                                <span>浅表淋巴结</span>
                            </div>
                            <div class="pro_item">
                                <span>肛门</span>
                            </div>
                            <div class="pro_item">
                                <span>脊柱</span>
                            </div>
                            <div class="pro_item">
                                <span>外生殖器</span>
                            </div> -->
                        </div>
                    </div>
                </div>
                <div class="project-item" style="height:21mm;">
                    <div class="pro_title">
                        <span style="top:2mm;left:4mm;">视/听力检查</span>
                    </div>
                    <div class="pro_item-content">
                        <div class="pro_item_box">
                            <div class="pro_item">
                                <span>左眼</span>
                                <label v-if="leftEye"></label>
                            </div>
                            <div class="pro_item">
                                <span>左耳</span>
                                <label v-if="leftEar"></label>
                                <!-- 正常 -->
                            </div>
                            <div class="pro_item">
                                <span>右眼</span>
                                <label v-if="rightEye"></label>
                            </div>
                            <div class="pro_item">
                                <span>右耳</span>
                                <label v-if="rightEar"></label>
                                <!-- 正常 -->
                            </div>
                        </div>
                        <!-- <div class="pro_item_box">
                        
                    </div> -->
                    </div>
                </div>

                <!-- <div class="project-item" style="line-height:15mm;">
                    <div class="pro_title">
                        <span style="top:5%;"></span>
                    </div>
                    <div class="pro_item-content">
                        <div class="pro_item_box" style="text-indent:10px;">
                        </div>
                    </div>
                </div> -->
                <div style="line-height:15mm;" class="project-item">
                    <div class="pro_title">
                        <span style="top:2%;left:0.5mm;">实验室/化验检查
                        </span>
                    </div>
                    <div class="pro_item-content">
                        <div class="pro_item_box" style="text-indent:10px;">
                            <!-- 正常 -->
                        </div>
                    </div>
                </div>
                <!-- <div class="project-item" style="height:12mm;">
                    <div class="pro_title">
                        <span style="top:0mm;left:2.5mm;">精神/动作发育</span>
                    </div>
                    <div class="pro_item-content">
                        <div class="pro_item_box" style="text-indent:10px;height:11mm!important;">
                        </div>
                    </div>
                </div> -->
                <div class="project-item" style="line-height:15mm;border-bottom:1px solid #aaa;">
                    <div class="pro_title">
                        <span style="top:5%;">指导</span>
                    </div>
                    <div class="pro_item-content">
                        <div class="pro_item_box" style="text-indent:10px;line-height:4mm!important;padding-top:2mm;">
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- built files will be auto injected -->
    <script src="https://lib.baomitu.com/vue/2.6.10/vue.min.js"></script>
    <script src="https://lib.baomitu.com/axios/0.17.0/axios.min.js"></script>
    <script src="https://lib.baomitu.com/qs/6.5.2/qs.min.js"></script>
    <!-- <script src="/src/_js/http.js"></script> -->
    <script>
        var vm = new Vue({
            el: "#reportApp",
            data: {
                detail: '',
                signForm: '',
                hosiptal: '',
                infos: '',
                tgHeight: '',
                jcHeight: '',
                leftEye: '',
                rightEye: '',
                rightEar: '',
                leftEar: '',
                zd: '',
                syans: '',
                bmi: '',
                logo: '',
                spirit: '',//精神
                motion: ''//动作
            },
            filters: {
                "toSex": function (value) {
                    return value == 1 ? "男" : "女";
                }
            },
            mounted() {
                var th = this;
                window.addEventListener("message", function (event) {
                    var data = event.data;
                    var pa = JSON.parse(data.params)
                    if (data.cmd == "postJson") {
                        th.$nextTick(function () {
                            th.detail = pa.detail;
                            th.signForm = pa.signForm;
                            th.infos = pa.infos
                            th.leftEye = pa.leftEye
                            th.rightEye = pa.rightEye
                            th.leftEar = pa.leftEar
                            th.rightEar = pa.rightEar
                            th.zd = pa.zd
                            th.logo = pa.logo
                            th.syans = pa.syans
                            th.spirit = pa.spirit
                            th.bmi = pa.bmi
                            th.motion = pa.motion
                            th.hosiptal = pa.hospitalName
                            setTimeout(function () {
                                window.print();
                                // window.document.body.innerHTML = document.getElementsByClassName("printOrder")[0].innerHTML;
                            }, 500);
                        });
                    }
                })
            },
            methods: {
                getOrderItem() {
                    var th = this;
                }
            },
        })
    </script>
</body>

</html>